/**
 *
 */
package com.fita.scheduler.entity;

import com.fita.entity.order.OrderStatus;
import com.fita.entity.principal.Principal;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author Guangli Yan
 *
 */
public class Order {

    private Long id;

    /** 订单号 */
    private String code;

    /**
     * alamo 系统订单号
     */
    private String alamoCode;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date pickupDate; // 取车时间

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date returnDate; // 还车时间

    private String status; // 订单状态

    private String brand; // 

    private String customerName; // 名

    private Date createTime;

    private int actualPayPrice; // 实际支付金额(精确到分)(￥)

    /**
     * 提成奖励记录
     */
    private Long distributionRewardRecordId;


    /**
     * 支付图片凭证
     */
    private String payPic;

    /**
     * 标记支付操作人
     */
    private String markPayOperator;

    /**
     * 标记支付时间
     */
    private Date markPayTime;

    /**
     * 订单取消时间
     */
    private Date cancelTime;

    /**
     *
     */
    public Order() {
    }

    /**
     * @return
     */
    public Order cancel() {

        this.status = OrderStatus.CANCELED.toString();

        this.cancelTime = new Date();

        return this;
    }

    /**
     *
     */
    public Order consume() {

        this.status = OrderStatus.CONSUMED.toString();

        return this;
    }


    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @return the alamoCode
     */
    public String getAlamoCode() {
        return alamoCode;
    }

    /**
     * @param alamoCode the alamoCode to set
     */
    public void setAlamoCode(String alamoCode) {
        this.alamoCode = alamoCode;
    }

    /**
     * @return the pickupDate
     */
    public Date getPickupDate() {
        return pickupDate;
    }

    /**
     * @param pickupDate the pickupDate to set
     */
    public void setPickupDate(Date pickupDate) {
        this.pickupDate = pickupDate;
    }

    /**
     * @return the returnDate
     */
    public Date getReturnDate() {
        return returnDate;
    }

    /**
     * @param returnDate the returnDate to set
     */
    public void setReturnDate(Date returnDate) {
        this.returnDate = returnDate;
    }

    /**
     * @return the status
     */
    public String getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * @return the brand
     */
    public String getBrand() {
        return brand;
    }

    /**
     * @param brand the brand to set
     */
    public void setBrand(String brand) {
        this.brand = brand;
    }

    /**
     * @return the customerName
     */
    public String getCustomerName() {
        return customerName;
    }

    /**
     * @param customerName the customerName to set
     */
    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    /**
     * @return the createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getDistributionRewardRecordId() {
        return distributionRewardRecordId;
    }

    public void setDistributionRewardRecordId(Long distributionRewardRecordId) {
        this.distributionRewardRecordId = distributionRewardRecordId;
    }

    public int getActualPayPrice() {
        return actualPayPrice;
    }

    public void setActualPayPrice(int actualPayPrice) {
        this.actualPayPrice = actualPayPrice;
    }

    public String getPayPic() {
        return payPic;
    }

    public void setPayPic(String payPic) {
        this.payPic = payPic;
    }

    public Date getMarkPayTime() {
        return markPayTime;
    }

    public void setMarkPayTime(Date markPayTime) {
        this.markPayTime = markPayTime;
    }

    public String getMarkPayOperator() {
        return markPayOperator;
    }

    public void setMarkPayOperator(String markPayOperator) {
        this.markPayOperator = markPayOperator;
    }

    public Date getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }
}
